//入口文件
console.log("ok")

import Vue from 'vue';
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import App from './App.vue';
import echarts from 'echarts';
import VueRouter from 'vue-router'
import iView from 'iview';
import 'iview/dist/styles/iview.css';
import './css/index.less';
Vue.use(ElementUI);
Vue.use(VueRouter);
Vue.use(iView, {
  transfer: true,
  size: 'large'
});
//导入自定义路由模块
import router from './router.js'
new Vue({
  el: '#app',
  render: h => h(App),
  router
});

router.beforeEach((to, from, next) => {
  iView.LoadingBar.start();
  next();
});

router.afterEach(route => {
  iView.LoadingBar.finish();
});

